<?php

/*
 * gpa_new Description
 * date 17 Feb 10
 * time 2:28:37
 * @$package
 * @name albums_html
 * @filesource albums_html.php
 * @author Hanny Setiawan
 */

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title><?php echo $page_title; ?></title>
<script src="<?php echo getJsUrl(); ?>jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo getAppCssUrl(); ?>gallery.css" type="text/css">
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>user/user.css" type="text/css">
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>home/home.css" type="text/css">

<!-- start jQuery menu -->
<link type="text/css" href="<?php echo getCssUrl(); ?>menu_apycom/menu.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo getJsUrl(); ?>menu_apycom/menu.js"></script>
<!-- end of jQuery menu -->

<!-- start Lightbox Gallery Image-->
<script src="<?php echo getJsUrl(); ?>prettyPhoto/prettyPhoto.js" type="text/javascript"></script>
<script src="<?php echo getJsUrl(); ?>prettyComments/prettyComments.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>prettyPhoto/prettyPhoto.css" type="text/css" media="screen"/>
<!-- end Lightbox Gallery Image -->

<!-- start Gallery Vertical -->
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>ImageVertCarrousel/scroll.css" type="text/css" media="screen"/>
<script type='text/javascript' src="<?php echo getJsUrl(); ?>ImageVertCarrousel/jquery.imageScroller.js"></script>
<script type='text/javascript' src="<?php echo getJsUrl(); ?>ImageVertCarrousel/test.js"></script>
<!-- end Gallery Vertical -->

<!-- start jQuery Image Details -->
<script type="text/javascript">
    $(document).ready(function(){
        $(".gallery a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});
    });
</script>
<!-- end jQuery Image Details -->

</head>
<body>

<div id="root">
    <div id="Table_01">
        <div id="index">
    	<div id="leftTop">
            <img class="logo" src="<?php echo getImgUrl(); ?>/home/logogpa.png" width="310" height="90" alt="Logo GPA">
        </div>
  		<div id="rightTop">
        	<div id="rTop">
            	<div class="login">
                	<div class="login-text">
                		<?php echo $usermenus; ?>
                    </div>
                    <div class="login-box">
                    	<input name="login-field" type="text" maxlength="30">
                    </div>
                </div>
            </div>
        	<div id="rBottom">
        		<div id="menu">
				<?php echo $mainmenus; ?>
                </div>
        	</div>
    	</div>
	</div>
        <div id="index002">
            <div id="add-menu">
                <?php if(@$self_profile) { ?>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/profile/">Profile Overview</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/edit/">Edit Profile</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/tools/">Tools</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/albums/">Albums</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/messages/">Messages</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/avatar/">Avatar</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/upgrade/">UPGRADE MEMBERSHIP!</a>
                </div>
                <?php } ?>
            </div>
            <style>
            #content form .dark {
                background-color: #0f0f0f;
                color: #f0f0f0;
                padding: 3px;
            }

            #content form .info {
                font-size: 9px;
                margin: 0;
                padding: 2px;
            }
            </style>
            <div class="content">
                <?php if(!empty($error_message)): ?>
                <p class="error"><?php echo $error_message; ?></p>
                <?php endif; ?>

                <h3><?php echo $image['title']; ?></h3>
                <a href="<?php echo getAppUrl('user', 'album') . '/' . $album_id; ?>">Back to album</a>
                <form style="padding: 10px; margin: 10px 0; border: 1px solid #151515; background: #000" id="edit_form" action="<?php echo getAppUrl('user', 'edit_image') . '/' . $image['image_id']; ?>" method="post">
                    <div align="center" style="clear: both"><img style="border: 5px #f0f0f0 solid" src="<?php echo $image['thumb']; ?>" title="<?php echo $image['title']; ?>" alt="<?php echo $image['title']; ?>" /></div>
                    <div style="margin-bottom: 15px; clear: both"></div>
                    <div style="position: relative; clear: both" style="padding-top: 5px; border-top: 1px solid #202020;">
                        <div style="float: right">
                            Move to:
                            <select name="album">
                                <?php foreach($albums as $album): ?>
                                <?php if($album['album_id']!=$not_selected): ?>
                                <option value="<?php echo $album['album_id']; ?>"<?php echo($album['album_id']==$album_id?' selected="selected"':''); ?>><?php echo $album['album_name']; ?></option>
                                <?php endif; ?>
                                <?php endforeach; ?>
                            </select>
                        </div>
                        <table border="0" cellpadding="5" cellspacing="0" style="width: 100%;">
                            <tr>
                                <td width="100">Title :</td>
                                <td><input class="dark" name="title" value="<?php echo $image['title']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td valign="top">Description :</td>
                                <td><textarea class="dark" name="desc" rows="4" style="width: 250px"><?php echo $image['description']; ?></textarea> </td>
                            </tr>
                            <tr>
                                <td>Published :</td>
                                <td><input class="dark" name="published" value="1" type="checkbox"<?php echo(intval($image['published'])?' checked="checked"':'') ?><?php echo($image['scope']=='screening'?' disabled="disabled"':'') ?> /></td>
                            </tr>
                            <tr>
                                <td width="100">Uploaded to :</td>
                                <td><input class="dark" name="scope" value="<?php echo $image['scope']; ?>" maxlength="255" style="width: 250px" readonly="readonly" /></td>
                            </tr>
                            <tr>
                                <td valign="top">Tags :</td>
                                <td>
                                    <input class="dark" name="tags" value="<?php echo join(",", $image['tags']); ?>" maxlength="255" style="width: 250px" />
                                    <p class="info">separate by comma</p>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top">Categories :</td>
                                <td>
                                    <select class="dark" name="categories[]" multiple="multiple" style="width: 200px">
                                        <?php
                                        for($i=0,$j=count($categories);$i<$j;$i++):
                                            $selected = false;
                                            foreach($image['categories'] as $cat) {
                                                if($cat['category_id'] == $categories[$i]['category_id']) {
                                                    $selected = true;
                                                    break;
                                                }
                                            }
                                        ?>
                                        <option value="<?php echo $categories[$i]['category_id']; ?>"<?php echo($selected?' selected="selected"':''); ?>><?php echo $categories[$i]['category_name']; ?></option>
                                        <?php endfor; ?>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Date :</td>
                                <td><input class="dark" name="info[date]" value="<?php echo @$image['info']['date']; ?>" maxlength="255" style="width: 250px" readonly="readonly"/></td>
                            </tr>
                            <tr>
                                <td>Location :</td>
                                <td><input class="dark" name="info[location]" value="<?php echo @$image['info']['location']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td>Camera :</td>
                                <td><input class="dark" name="info[camera]" value="<?php echo @$image['info']['camera']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td>Lens :</td>
                                <td><input class="dark" name="info[lens]" value="<?php echo @$image['info']['lens']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td>Filter :</td>
                                <td><input class="dark" name="info[filter]" value="<?php echo @$image['info']['filter']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td>Speed :</td>
                                <td><input class="dark" name="info[speed]" value="<?php echo @$image['info']['speed']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td>Diafragma :</td>
                                <td><input class="dark" name="info[diafragma]" value="<?php echo @$image['info']['diafragma']; ?>" maxlength="255" style="width: 250px" /></td>
                            </tr>
                            <tr>
                                <td>Nude :</td>
                                <td><input class="dark" name="info[nude]" value="1" type="checkbox"<?php echo(intval(@$image['info']['nude'])?' checked="checked"':'') ?> /></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><input type="submit" value="save" /></td>
                            </tr>
                        </table>
                    </div>
                </form>
            </div>
	</div>
    </div>
</div>
    	<a id="thanks" href="http://apycom.com/">Apycom jQuery Menus</a>
</body>
</html>